package com.ivory.valley.controller;



import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.ivory.valley.common.Resp;
import com.ivory.valley.service.UserService;

@RestController
@RequestMapping("/user")
public class UserController {
	
	@Autowired
	private UserService userService;
	
	public Resp<Boolean> login(HttpServletRequest request,HttpServletResponse response,
			@RequestParam("openid") String openid){
		Resp<Boolean> resp = new Resp<>();
		//userService.findUserByOpenid(openid);
		if(openid != null){
			//登录成功
			
		}else{
			//创建帐号并登录
		}
		return resp;
	}
}
